// Start Menu
PANEL = {}
function PANEL:Setup()
	self.btnQuit = vgui.Create( "DButton" )
	self.btnQuit:SetParent( self )
	self.btnQuit:SetPos( self:GetWide()-20, 0 )
	self.btnQuit:SetSize( 20, 20 )
	self.btnQuit:SetText( "X" )
	self.btnQuit.DoClick = function( self )
		PCMod.StartMenu:SetV( false )
		PCMod.ProgramList:SetV( false )
	end
	pc_hackbutton( self.btnQuit )
	
	self.btnMyComputer = vgui.Create( "DButton" )
	self.btnMyComputer:SetParent( self )
	self.btnMyComputer:SetPos( 6, (self:GetTall()*0.1) + 12 )
	self.btnMyComputer:SetSize( self:GetWide()-12, 25 )
	self.btnMyComputer:SetText( "My Computer" )	
	self.btnMyComputer.DoClick = function( self )
		PCMod.StartMenu:SetV( false )
		RunConsoleCommand( "pc_command", "load_prog", "MyComputer" )
	end
	
	self.btnShutDown = vgui.Create( "DButton" )
	self.btnShutDown:SetParent( self )
	self.btnShutDown:SetPos( 6, (self:GetTall()*0.1) + 52 )
	self.btnShutDown:SetSize( self:GetWide()-12, 25 )
	self.btnShutDown:SetText( "Shut Down" )	
	self.btnShutDown.DoClick = function( self )
		PCMod.StartMenu:SetV( false )
		RunConsoleCommand( "pc_command", "turn_off" )
	end
	
	self.btnLogOff = vgui.Create( "DButton" )
	self.btnLogOff:SetParent( self )
	self.btnLogOff:SetPos( 6, (self:GetTall()*0.1) + 82 )
	self.btnLogOff:SetSize( self:GetWide()-12, 25 )
	self.btnLogOff:SetText( "Log Off" )	
	self.btnLogOff.DoClick = function( self )
		PCMod.StartMenu:SetV( false )
		RunConsoleCommand( "pc_command", "log_off" )
	end
	
	self.btnAllProgs = vgui.Create( "DButton" )
	self.btnAllProgs:SetParent( self )
	self.btnAllProgs:SetPos( 6, self:GetTall() - 30 )
	self.btnAllProgs:SetSize( self:GetWide()-12, 25 )
	self.btnAllProgs:SetText( "All Programs" )
	self.btnAllProgs.DoClick = function( )
		PCMod.ProgramList:SetV( true )
		PCMod.ProgramList:BuildList( )
		pc_focusplist()
	end
	
	pc_hackbutton( self.btnMyComputer )
	pc_hackbutton( self.btnShutDown )
	pc_hackbutton( self.btnLogOff )
	pc_hackbutton( self.btnAllProgs )
end
function PANEL:SetV( v )
	self.Show = v
	self:SetVisible( v )
	if (v) then pc_focusstart() end
	if (!v) then
		if (C_PRO.Exists) then pc_focusprogram() end
		if (!C_PRO.Exists) then pc_focusdesktop() end
	end
end
function PANEL:Paint()
	if ((self.Show) && (C_PC.Status==3)) then
		local pri = CurrentTheme.StartMenu.MainColour
		local sec = CurrentTheme.StartMenu.SecondaryColour
		local tex = CurrentTheme.StartMenu.TextColour
		draw.RoundedBox( 6, 0, 0, self:GetWide(), self:GetTall(), sec )
		draw.RoundedBox( 6, 4, 4, self:GetWide()-8, self:GetTall()*0.1, pri )
		draw.RoundedBox( 6, 4, (self:GetTall()*0.1)+8, self:GetWide()-8, (self:GetTall()*0.9)-12, pri )
		draw.SimpleText( "Start Menu", "PCText", self:GetWide()/2, self:GetTall()*0.05, tex, 1, 1 )
	end
end
vgui.Register( "StartMenu", PANEL, "PANEL" )